<?
ob_start();
?>
DAFTAR USER DAN PASSWORD<br><br>
<table>
 <tr>
  <td align="center">Nama Lengkap</td>
  <td align="center">Username</td>
  <td align="center">Password</td>
 </tr>
<?
	include("config.php");
	$id 	= $HTTP_GET_VARS['id'];
	$sql 	= mssql_query("SELECT * FROM S_User_Tmp WHERE id='".$id."'");
	while($row = mssql_fetch_array($sql)){
		echo"
		 <tr>
		  <td>";
		// get nama
		$unik	= mssql_query("SELECT nama FROM Karyawan WHERE NIK='$row[username]'",$conn);  
		if($unik){
			$runik = mssql_fetch_array($unik);
			echo"$runik[0]";
		}
		else{
		
		}
		echo"</td>
		  <td>$row[username]</td>
		  <td>$row[password]</td>		  
		 </tr>
		";
	}
?>
</table>
<?
	header('Content-type: application/msword');
	header("Content-Disposition: attachment; filename=ListPassword.doc");
	header("Pragma: no-cache");
	header("Expires: 0");
?>